package cn.tedu.zx.pojo.court.dto;

import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;
import java.io.Serializable;


@Data
@TableName("picture")
@Accessors(chain = true)
public class PictureUpdateDto implements Serializable {

    @NotNull
    @ApiModelProperty("id标识")
    private Long id;

    @Range(min = 1,message = "修改图片失败，请输入大于0的数字")
    @ApiModelProperty(value = "相册id",required = true,example = "2")
    private Long albumId;


    @ApiModelProperty(value = "图片简介",required = false,example = "夕阳")
    private String description;

    @NotNull(message = "修改图片失败，图片地址不能为空")
    @ApiModelProperty(value = "图片地址",required = true,example = "夕阳.jpg")
    private String url;


    @NotNull(message = "修改图片失败，图片宽度不能为空")
    @ApiModelProperty(value = "图片宽度/像素",required = true,example = "200")
    private Integer width;


    @NotNull(message = "修改图片失败，图片高度不能为空")
    @ApiModelProperty(value = "图片高度/像素",required = true,example = "200")
    private Integer height;

    @ApiModelProperty(value = "是否设为封面",required = false,example = "0")
    private Integer isCover;

    @Range(min = 1,max = 100,message = "请输入1-100之间的数字")
    @ApiModelProperty(value = "排序序号",required = true,example = "56")
    private Integer sort;
}
